//
//  mingxiCell.m
//  Ten
//
//  Created by anfuer on 2018/8/18.
//  Copyright © 2018年 xg韦. All rights reserved.
//

#import "mingxiCell.h"

@implementation mingxiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)CellWithTableView:(UITableView *)tableView
{
    static NSString *reuseId = @"mingxiCell";
    mingxiCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseId];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"mingxiCell" owner:nil options:nil] lastObject];
        
    }
    return cell;
    
}


-(void)Cellinit:(NSDictionary*)dic
{
    _lb1.text=dic[@"explain"];
    if ([WXGStr(dic[@"type"])isEqualToString:@"2"]) {
        _lb2.text=[NSString stringWithFormat:@"-%@",dic[@"salary"]];
          _lb2.textColor=[UIColor greenColor];
    }else
    {
          _lb2.text=[NSString stringWithFormat:@"+%@",dic[@"salary"]];
        _lb2.textColor=[UIColor redColor];
    }
    _lb4.text=dic[@"add_time"];
    _lb3.text=[NSString stringWithFormat:@"来源%@-%@",dic[@"account"],dic[@"type_name"]];
}
@end
